﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Core
{
    /// <summary>
    /// Implicit definition
    /// </summary>
    public class ImplicitDefinition
    {
        /// <summary>
        /// Function
        /// </summary>
        private Function _Function;
        public Function Function
        {
            get { return _Function; }
        }

        /// <summary>
        /// Pre condition
        /// </summary>
        private PreCondition _PreCond;
        public PreCondition PreCond
        {
            get { return _PreCond; }
        }

        /// <summary>
        /// Post condition
        /// </summary>
        private PostCondition _PostCond;
        public PostCondition PostCond
        {
            get { return _PostCond; }
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="input"></param>
        public ImplicitDefinition(String input)
        {
            String[] strArr = input.Split(new String[] { "\n" },
                                              StringSplitOptions.RemoveEmptyEntries);
            //if (strArr.Length != 3)
            //    throw new Exception("Implicit definition ERROR.");

            _Function = new Function(strArr[0]);
            _PreCond = new PreCondition(strArr[1]);
            //_PostCond = new PostCondition(strArr[3]);
        }
    }
}
